Skip to content

docs: Safety docs - #6307

Merged
davidhewitt merged 10 commits into
PyO3:mainfrom
Person-93:safety-docs
Aug 16, 2026
Merged

docs: Safety docs#6307
davidhewitt merged 10 commits into
PyO3:mainfrom
Person-93:safety-docs

Conversation

@Person-93

Copy link
Copy Markdown
Contributor

Add safety docs to a few files. I've refactored a bit of internal/state.rs into a submodule to contain some of its unsafe assumptions.

While I was in internal/state.rs, I also removed a OnceLock that was unnecessarily wrapping a Mutex.

@Person-93
Person-93 marked this pull request as ready for review August 7, 2026 08:07
@Person-93 Person-93 changed the title Safety docs docs: Safety docs Aug 7, 2026

@davidhewitt davidhewitt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is much appreciated, the refactoring is great and has prompted a couple further ideas.

Comment thread src/internal/state.rs Outdated
Comment thread src/internal/state.rs
Comment thread src/internal/state.rs Outdated
@Person-93
Person-93 force-pushed the safety-docs branch 2 times, most recently from ad0ad98 to d9d7651 Compare August 13, 2026 01:51
@codspeed-hq

codspeed-hq Bot commented Aug 13, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 141 untouched benchmarks
⏩ 6 skipped benchmarks1


Comparing Person-93:safety-docs (07e61ef) with main (b94baec)

Open in CodSpeed

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@davidhewitt davidhewitt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is a great improvement in safety & quality 👍

@davidhewitt
davidhewitt added this pull request to the merge queue Aug 16, 2026
Merged via the queue into PyO3:main with commit eb9f68c Aug 16, 2026
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants